package log4j;

import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Layout;
import org.apache.log4j.PatternLayout;

import java.io.OutputStreamWriter;

public final class Log4JUtils {
    private Log4JUtils() {
    }
    
    public static PatternLayout newPatternLayout(String pattern) {
        return new PatternLayout(pattern);
    }

    public static ConsoleAppender newConsoleAppender() {
        ConsoleAppender result = new ConsoleAppender();
        result.setWriter(new OutputStreamWriter(System.out));
        return result;
    }
}
